#include <gtest/gtest.h>

#include <climits>
#include <cstddef>

#include "tree/tree.h"

class TreeTest : public ::testing::Test
{
  protected:
    void SetUp() override
    {
        // 初始化代码 (需要时)
    }
};

TEST_F(TreeTest, BasicTest)
{
    const int arr[] = {1, 2, 3, 4, 5};

    TreeNode* tree = createTreeForTest(arr, sizeof(arr) / sizeof(int));
    EXPECT_TRUE(tree->left->left->data == 4 && tree->left->right->data == 5);
    deleteTree(tree);
}